/**
 * base64
 */

const Base64 = require('js-base64').Base64;

function encode(value) {
    if (value) {
        return Base64.encode(value);
    } else {
        return '';
    }
}

function decode(value) {
    if (value) {
        return Base64.decode(value);
    } else {
        return '';
    }
}

exports.encode = encode;
exports.decode = decode;
